-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GOBBLIN-2163] Adding Iceberg TableMetadata Validator #4064
Conversation
Will the integration with |
In this PR only after PR #4058 is merged first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall Looks good with small suggestions
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidator.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidator.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidator.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidator.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidator.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidator.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidator.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidator.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorTest.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidator.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorTest.java
Outdated
Show resolved
Hide resolved
9e02107
to
753dc94
Compare
...java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtils.java
Outdated
Show resolved
Hide resolved
...java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtils.java
Outdated
Show resolved
Hide resolved
...java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtils.java
Outdated
Show resolved
Hide resolved
.../org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtilsTest.java
Outdated
Show resolved
Hide resolved
.../org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtilsTest.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergPartitionDatasetFinder.java
Outdated
Show resolved
Hide resolved
...java/org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtils.java
Outdated
Show resolved
Hide resolved
.../org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtilsTest.java
Outdated
Show resolved
Hide resolved
.../org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtilsTest.java
Outdated
Show resolved
Hide resolved
@Test | ||
public void testValidateSchemaWithEvolvedSchemaI() { | ||
// TODO: This test should pass in the future when we support schema evolution | ||
// Schema 3 has one more extra field as compared to Schema 1 | ||
verifyFailUnlessCompatibleStructureIOException(tableMetadataWithSchema1AndUnpartitionedSpec, | ||
tableMetadataWithSchema3AndUnpartitionedSpec, SCHEMA_MISMATCH_EXCEPTION); | ||
} | ||
|
||
@Test | ||
public void testValidateSchemaWithEvolvedSchemaII() { | ||
// TODO: This test should pass in the future when we support schema evolution | ||
// Schema 3 has one more extra field as compared to Schema 1 | ||
verifyFailUnlessCompatibleStructureIOException(tableMetadataWithSchema3AndUnpartitionedSpec, | ||
tableMetadataWithSchema1AndUnpartitionedSpec, SCHEMA_MISMATCH_EXCEPTION); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking across these two test cases, when we do later support schema evolution, do we really expect it to be a symmetrical operation (where both cases would pass)? I'd have thought to only support forward-compatibility, but not backward compat. i.e. S is compatible w/ S`, but S` is no longer compatible w/ S.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a valid point, we can discuss about this in detail but totally agree with your point to only support forward-compatibility, but not backward compat.
Removing the comment from first test.
.../org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtilsTest.java
Outdated
Show resolved
Hide resolved
.../org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtilsTest.java
Outdated
Show resolved
Hide resolved
.../org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtilsTest.java
Outdated
Show resolved
Hide resolved
.../org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtilsTest.java
Outdated
Show resolved
Hide resolved
.../org/apache/gobblin/data/management/copy/iceberg/IcebergTableMetadataValidatorUtilsTest.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergPartitionDatasetFinder.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergPartitionDatasetFinder.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work all around, vivek!
Thanks for all help and suggestions along the way, Kip. |
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
Tests
Commits